package com.base.common.serializer.impl;

import com.base.api.Message;
import com.base.common.serializer.Serializer;
import com.base.common.serializer.SeriallzerFactory;


/**
 * 工厂模式
 */
public class JacksonSerializerFactory  implements SeriallzerFactory {

    public static  final SeriallzerFactory INSTANCE=new JacksonSerializerFactory();

    @Override
    public Serializer create() {
        //选择使用那种序列化
        return JacksonSerializer.createParametricType(Message.class);
    }
}
